<html xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui" >  

    <!--    <h:body>-->
    <ui:composition template="layout.xhtml">
        <ui:define name="corpo">
             <h:form>
                <div id="breadcrumb">
                    <p:commandLink  actionListener="#{managerIndex.redirect('index.xhtml')}" value="Inicio" update="@form" immediate="true"/> >
                    <p:commandLink  value="Selos" update="@form" immediate="true"/>
                </div>
            </h:form>
            <p:panel header="Principal - Selos">
                <table style="min-height:500px; width: 100%">
                    <tr>
                        <td style="width: 200px; vertical-align: top">
                            <h:form>
                                <p:menu style="width:200px;" >  
                                    <p:submenu label="Entrada Selo">  
                                        <p:menuitem value="Cadastrar" actionListener="#{managerSelo.criarSelo()}" update="@form" icon="ui-icon-plusthick"/>  
                                        <p:menuitem value="Pesquisar" actionListener="#{managerSelo.redirect('buscarEntradaSelo.xhtml')}" icon="ui-icon-search"/> 
                                    </p:submenu>
                                    <p:submenu label="Selos">  
                                        <p:menuitem value="Cancelar" actionListener="#{managerIndex.redirect('cancelarSelo.xhtml')}" icon="ui-icon-alert"/> 
                                    </p:submenu>  
                                    <p:submenu label="Distribuir">  
                                        <p:menuitem value="Distribuir Selo" actionListener="#{managerIndex.redirect('criarDistribuicao.xhtml')}"  update="@form" icon="ui-icon-document"/>  
                                        <p:menuitem value="Pesquisar Distribuição" actionListener="#{managerIndex.redirect('buscarDistribuicao.xhtml')}"  update="@form" icon="ui-icon-document"/>  
                                    </p:submenu>  
                                    <p:submenu label="Relatórios">  
                                        <p:menuitem value="Selos Usados" actionListener="#{managerIndex.redirect('relatorioSeloProtocolo.xhtml')}"  update="@form" icon="ui-icon-refresh"/>  
                                        <p:menuitem value="Selos Não Usados" actionListener="#{managerIndex.redirect('relatorioSeloNaoUsado.xhtml')}"  update="@form" icon="ui-icon-refresh"/>  
                                    </p:submenu>
                                     <p:menuitem value="Estoque Selo" actionListener="#{managerCorSelo.redirect('estoqueSelo.xhtml')}"  update="@form" icon="ui-icon-clipboard"/>  
                                </p:menu>  

                            </h:form>
                        </td>
                        <td style="vertical-align:top;">
                            <h:form id="index_form" acceptcharset="utf-8"> 
<!--                                <h:panelGrid style="float: right;" columns="8">-->
<!--                                    <p:graphicImage url="/media/img/new.png" title="Cadastrar Selo" /> 
                                    <p:commandLink   value="Entrada" title="Cadastrar Selo" 
                                                     action="{managerSelo.criarSelo()}" 
                                                     update="@all"/>
                                    <p:graphicImage url="/media/img/search.png" title="Pesquisar Selo" />
                                    <p:commandLink   value="Pesquisar" title="Pesquisar Selo" 
                                                     action="{managerSelo.redirect('buscarEntradaSelo.xhtml')}" 
                                                     update="@all"/>
                                                            <p:graphicImage url="/media/img/search.png" title="Pesquisar Selo"/><p:commandLink  value="Pesquisar" title="Pesquisar Selo" action="{managerPessoa.pesquisarPessoa()}" />-->


<!--                                    <p:graphicImage url="/media/img/avancado.png" title="Avançado" />
                                    <p:commandLink value="Avançado" id="linkCertidoes" 
                                                   style="margin-left: -7px;" 
                                                   title="Avançados" />
                                    <p:overlayPanel id="certidoes" for="linkCertidoes" 
                                                    hideEffect="fade" style="width:150px;">  
                                        <h:panelGrid columnClasses="paddingColuna" columns="2">

                                            <p:graphicImage url="/media/img/verme.png" title="Cancelar Selo" />
                                            <p:commandLink value="Cancelar Selo" style="margin-left: -3px;" 
                                                           title="Cancelar Selo" 
                                                           action="{managerImovel.redirect('cancelarSelo.xhtml')}" />

                                            <p:graphicImage url="/media/img/distribuir.png" title="Negativa" />
                                            <p:commandLink value="Distribuir Selo" style="margin-left: -3px;" 
                                                           title="Certidões Negativa" 
                                                           action="{managerImovel.redirect('criarDistribuicao.xhtml')}" />

                                            
                                            <p:graphicImage url="/media/img/relatorio.png" title="Negativa" />
                                            <p:commandLink value="Relatórios" style="margin-left: -3px;" 
                                                           title="Certidões Negativa" 
                                                           action="{managerImovel.redirect('certidaoNegativa.xhtml')}" />-->


                                            <!--                                <p:graphicImage url="/media/img/relatorio.png" title="Negativa" />
                                                                            <p:commandLink value="Controle" style="margin-left: -3px;"  title="Certidões Negativa" action="{managerImovel.redirect('certidaoNegativa.xhtml')}" />-->

<!--                                        </h:panelGrid>-->
<!--                                    </p:overlayPanel>  -->
<!--                                </h:panelGrid>-->
<!--                                <h:panelGrid style="float: left;" columns="6">
                                    <p:graphicImage url="/media/img/verde_.png" title="Negativa" />
                                    <p:commandLink value="Selar" 
                                                   style="margin-left: -3px;"  
                                                   title="Protocolos Pendentes"
                                                   action="{managerImovel.redirect('certidaoNegativa.xhtml')}" />

                                    <p:graphicImage url="/media/img/verme_.png" title="Negativa" />
                                    <p:commandLink value="Selados" style="margin-left: -3px;"  
                                                   title="Protocolos Selados"
                                                   action="{managerImovel.redirect('certidaoNegativa.xhtml')}" />

                                </h:panelGrid>-->
                                <h:panelGrid columns="2" width="770">

<!--                                    <p:pieChart value="#{managerSelo.pieModel}" title="MEUS SELOS"  style="float:right; margin-right: 10px; width:400px;height:350px;" legendPosition="w" showDataLabels="true"  seriesColors="C53535, 8FAAB5, F7FBFD, cd0a0a, 2288AA, cc6666, 004B84, AAAAAA, 222222, A7F477, FF2900"/>-->
                                    <p:poll interval="25" listener="#{managerSelo.createCategoryModel()}" update="grafic" />
                                    <p:barChart id="grafic" value="#{managerSelo.createCategoryModel()}" 
                                                breakOnNull="true" enhancedLegend="shows"
                                                style="float:right; margin-right: 10px; width:460px;height:350px;"
                                                legendPosition="ne"  title="MEUS SELOS"
                                                min="0" max="#{managerSelo.qtd}" 
                                                seriesColors="C53535, 8FAAB5, 2288AA, cc6666, 004B84, AAAAAA, 222222, A7F477, FF2900" />  

                                </h:panelGrid>
                            </h:form>
                        </td>
                    </tr></table>
            </p:panel>


        </ui:define>
    </ui:composition>
</html>
